<?php
declare(strict_types=1);
namespace SixShop\Payment\Enum;

enum PaymentStatusEnum:int
{
    case PENDING = 0;
    case PAYING = 1;
    case SUCCESS = 2;
    case FAIL = 3;
    case CLOSED = 4;
    case REFUNDING = 5;

    public function toString(): string
    {
        return match ($this) {
            self::PENDING => '待支付',
            self::PAYING => '支付中',
            self::SUCCESS => '成功',
            self::FAIL => '失败',
            self::CLOSED => '已关闭',
            self::REFUNDING => '退款中',
        };
    }
}
